Previous Book Contents Book Index Next

Inside Macintosh: QuickDraw GX Objects /
Chapter 2 - Shape Objects / Shape Objects Reference
Functions / Manipulating Shape Object Properties


GXSetShapeTags

You can use the GXSetShapeTags function to add, remove, or replace tag objects associated with a shape object.

void GXSetShapeTags(gxShape target, long tagType, long index, 
                  long oldCount, long newCount, 
                  const gxTag items[]);
target
A reference to the shape object to alter the tag list of.
tagType
The type of tag objects to replace. A value of 0 indicates that you want to replace tags of all types.
index
The (1-based) index of the first tag reference (to a tag object of the appropriate type) to replace.
oldCount
The number of tag references to replace. A value of 0 specifies that you want to insert tag references before the tag reference indicated by the index parameter, rather than replace tag references. A value of -1 (the gxSelectToEnd constant) specifies that all tag references of the requested type, starting with the tag reference indicated by the index parameter, should be replaced.
newCount
The number of tag references to insert. A value of 0 specifies that there are no tag references to insert; the existing tag references that match the criteria you specify are removed from the source shape's tag list and disposed of.
items
An array of tag references to insert in the tag list.
DESCRIPTION
The GXSetShapeTags function allows you to add tag references to a shape object's tag list, to remove tag references from the list, or to replace tag references in the list with new tag references. In any of these three cases, the target parameter specifies the shape object to be modified, the newCount parameter specifies the number of tag references to add, and the items parameter provides the new tag references.

ERRORS, WARNINGS, AND NOTICES
Errors 
out_of_memory 
shape_is_nil 
tag_is_nil 
parameter_is_nil(debugging version)
inconsistent_parameters(debugging version)
parameter_out_of_range(debugging version)
index_is_less_than_zero(debugging version)
cannot_dispose_locked_tag(debugging version)
Warnings 
index_out_of_range 
count_out_of_range 
Notices (debugging version) 
tag_already_set
SEE ALSO
Tag objects are introduced in the chapter "Introduction to Objects" in this book. Functions to create and manipulate tags objects, and a list of reserved tag types, are described in the chapter "Tag Objects" in this book.

To examine the set of tag references associated with a shape, use the GXGetShapeTags function, described in the previous section.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996